#!/bin/bash
while read IP
do
	ping -c1 $IP 2>&1 > /dev/null

	if [[ $? == 0 ]]
	then
		echo $IP
	fi
done
